1
general::
Also, have all one's marbles. Be completely sane and rational. For example, Grandma may be in a wheelchair, but she still has all her buttons, or I'm not sure he has all his marbles. These slangy expressions date from the mid-1800s, as do the antonyms lose or be missing some of one's buttons or marbles, meaning "become (or be) mentally deficient."
American Heritage Idioms